package com.mybatis.crudservice.service.impl;

import com.mybatis.crudservice.dao.ReadDao;
import com.mybatis.crudservice.service.ReadService;
import com.mybatis.crudservice.tools.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @ 描 述 : ReadService接口实现
 * @ 作 者 : 一念〃
 * @ 时 间 : 17:00 2019/5/25
 * @ 备 注 :
 */
@Service
public class ReadServiceImpl implements ReadService {

    @Autowired
    private ReadDao readDao;

    @Override
    public Map<String, Object> readOne(String mapperName, String selectName, Object params) {
        return readDao.readOne(mapperName,selectName,params);
    }

    @Override
    public List<Map<String, Object>> readAll(String mapperName, String selectName, Object params) {
        return readDao.readAll(mapperName,selectName,params);
    }

    @Override
    public PageInfo<Map<String, Object>> readList(String mapperName, String selectName, Object params, PageInfo<Map<String, Object>> page) {
        return readDao.readList(mapperName,selectName,params,page);
    }
}
